package it.uniroma2.mpsr.resources;

import java.math.BigDecimal;

public class FPResults {

	private String[] centresNames;
	private State[] states;
	private double[][] margProbs;
	private BigDecimal gN;
	private double[] meanPops;
	private double[] rho;
	private double[] lambda;
	private double[] residenceTimes;
	private double[] respTimes;

	public FPResults(Centre[] centres, State[] states, double[][] margProbs, BigDecimal gN,
			double[] meanPops, double[] rho, double[] lambda,
			double[] residenceTimes, double[] respTimes) {
		centresNames = new String[centres.length];
		for(int i = 0; i < centres.length; i++)
			centresNames[i] = centres[i].getName();
		this.states = states;
		this.margProbs = margProbs;
		this.gN = gN;
		this.meanPops = meanPops;
		this.rho = rho;
		this.lambda = lambda;
		this.residenceTimes = residenceTimes;
		this.respTimes = respTimes;
	}

	public void print() {
		System.out.print("Risultati FP sul Modello 1:\n\t\t\t\t\t\t");
		for(int i = 0; i < centresNames.length; i++)
			System.out.print("\t" + centresNames[i] + "\t");
		System.out.print("\n\tPopolazioni medie:\t\t");
		for(int i = 0; i < meanPops.length; i++)
			System.out.print("\t" + meanPops[i]);
		System.out.print("\n\tThroughput:\t\t\t");
		for(int i = 0; i < lambda.length; i++)
			System.out.print("\t" + lambda[i]);
		System.out.print("\n\tUtilizzazioni:\t\t\t");
		for(int i = 0; i < rho.length; i++)
			System.out.print("\t" + rho[i]);
		System.out.print("\n\tTempi medi di residenza:\t");
		for(int i = 0; i < residenceTimes.length; i++)
			System.out.print("\t" + residenceTimes[i]);
		System.out.print("\n\tTempi medi di risposta:\t\t");
		for(int i = 0; i < respTimes.length; i++)
			System.out.print("\t" + respTimes[i]);
		System.out.println("\n");
	}

	public String[] getCentresNames() {
		return centresNames;
	}

	public State[] getStates() {
		return states;
	}

	public double[][] getMargProbs() {
		return margProbs;
	}

	public BigDecimal getgN() {
		return gN;
	}

	public double[] getMeanPops() {
		return meanPops;
	}

	public double[] getRho() {
		return rho;
	}

	public double[] getLambda() {
		return lambda;
	}

	public double[] getResidenceTimes() {
		return residenceTimes;
	}

	public double[] getRespTimes() {
		return respTimes;
	}



}
